<%- include('head') %>

<form action="http://localhost:3000/reptile/website/data" method="GET">
    <p>网址: <input name="website" type="text" placeholder="请输入需要爬取的网址"></p>
    <p>查找路径: <input name="webpath" type="text" placeholder="请输入查找路径"></p>
    <p>查找属性: <input name="webattr" type="text" placeholder="请输入查找属性"></p>
    <input type="submit" value="提交">
</form>



<style>
    .table-box{
        border-spacing: 0;
    }
    .table-box thead th{
        background-color: #cee3ef;
        padding: 4px 6px;
    }
    .table-box tbody tr td:first-of-type{
        border-left: 1px solid #cee3ef;
    }
    .table-box tbody td{
        padding: 6px 12px;
        border-bottom:  1px solid #cee3ef;
        border-right: 1px solid #cee3ef;
        text-align: center;
    }
</style>
<table class="table-box" border="0" align="center" cellpadding="0" cellspacing="0" style="width: 100%;">
    <thead>
        <tr>
          <% for (let tit of list.title) { %>
            <p>
                <th><%= tit %></th>
            </p>
          <% } %>
        </tr>
      </thead>
      <tbody>
        <% for (let item of list.tbody) { %>
            <tr>
                <td>《<%= item.title %>》</td>
                <td><img src="<%= item.original %>" alt=""></td>
                <td><a href="<%= item.href %>" target="_blank"><%= item.href %></a></td>
              </tr>
          <% } %>
      </tbody>
  </table>


<%- include('foot') %>